package com.jxsd.edu.cn.struts2.serviceImpl;

import java.util.List;

import com.jxsd.edu.cn.struts2.dao.LabelViewDao;
import com.jxsd.edu.cn.struts2.daoImpl.LabelViewDaoImpl;
import com.jxsd.edu.cn.struts2.models.LabelView;
import com.jxsd.edu.cn.struts2.services.LabelService;
import com.jxsd.edu.cn.tools.Page;
import com.jxsd.edu.cn.tools.PageBean;

public class LabelServiceImpl implements LabelService {
   private   LabelViewDao   dao=new   LabelViewDaoImpl();
	
	@Override
	public List<LabelView> getLabelViews(String  userId) 
	{
		List<LabelView>  list=dao.getLabelViews(userId);
		return list;
	}

	@Override
	public void addLabel(LabelView label) {
		dao.addLabel(label);
	}

	@Override
	public void deleteLabel(String labelId) {
		dao.deleteLabel(labelId);
	}

	@Override
	public Page<LabelView> getLabels(PageBean<LabelView> pagebean) {
		return dao.getLabels(pagebean);
	}

	@Override
	public void addLabels(List<LabelView> labs) {
		for(LabelView view:labs)
		{
			dao.addLabel(view);
		}
		
	}

}
